import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

// 一级
import login from "../pages/one/login/login.vue"
import register from "../pages/one/register/register.vue"
import index from "../pages/one/index/index.vue"
import foodList from "../pages/one/foodList/foodList.vue"
import foodSearch from "../pages/one/foodSearch/foodSearch.vue"
import foodDetail from "../pages/one/foodDetail/foodDetail.vue"
import site from "../pages/one/site/site.vue"
import addSite from "../pages/one/addSite/addSite.vue"
import order from "../pages/one/order/order.vue"
import pay from "../pages/one/pay/pay.vue"
// 二级
import store from "../pages/two/store/store.vue"
import cate from "../pages/two/cate/cate.vue"
import shop from "../pages/two/shop/shop.vue"
import mine from "../pages/two/mine/mine.vue"
const routes = [
  {path: '/login',name: 'login',component: login,meta:{title:"手机登录"}},
  {path: '/register',name: 'register',component: register,meta:{title:"手机注册"}},
  {path: '/index',name: 'index',component: index,
    children:[
      {path: 'store',name: 'store',component: store,meta:{title:"商城"}},
      {path: 'cate',name: 'cate',component: cate,meta:{title:"分类"}},
      {path: 'shop',name: 'shop',component: shop,meta:{title:"购物车"}},
      {path: 'mine',name: 'mine',component: mine,meta:{title:"我的"}},
    ]
  },
  {path: '/foodList',name: 'foodList',component: foodList,meta:{title:"商品列表"}},
  {path: '/foodSearch',name: 'foodSearch',component: foodSearch,meta:{title:"商品搜索"}},
  {path: '/foodDetail',name: 'foodDetail',component: foodDetail,meta:{title:"商品详情"}},
  {path: '/site',name: 'site',component: site,meta:{title:"地址管理"}},
  {path: '/addSite',name: 'addSite',component: addSite,meta:{title:"新增地址"}},
  {path: '/order',name: 'order',component: order,meta:{title:"确认订单"}},
  {path: '/pay',name: 'pay',component: pay,meta:{title:"支付页面"}},
  
]

const router = new VueRouter({
  routes
})

export default router
